<include file="Public:header" />
<div id="main" class="main" >
<div class="content">
  <div class="title">新增消费记录 [ <a href="__URL__/index">返回列表</a> ]</div>
<div id="result" class="result none"></div>
<form method='post' id="form1" action="__URL__/insert/">
<table cellpadding=3 cellspacing=3 >
<tr>
	<td class="tRight" >入住消费单号：</td>
	<td class="tLeft" >
        <empty name="_REQUEST.checkin_id">

             <select name="checkin_id">
                <volist name="checkins" id="checkin">
                    <option value="{$checkin.id}">{$checkin.checkin_no} (预订人：{$checkin.member_name} )</option>
                </volist>
            </select>
            <else /> 
            <!--从入住表新增消费记录而来-->
                <input type="hidden" name="checkin_id" value="{$_REQUEST.checkin_id}">
                {$_REQUEST.checkin_id|getModelName='Checkin','checkin_no'}
                <input type="hidden" name="jumpUrl" value="__APP__/Checkin/edit1/id/{$_REQUEST.checkin_id}#cost">
        </empty> 
        </td>
</tr>
<tr>
	<td class="tRight" >费用类型：</td>
	<td class="tLeft" >
            <select name="cost_type" id="cost_type">
                <volist name="cost_types" id="vo">
                    <option value="{$key}" >{$vo}</option>
                </volist>
            </select>
        </td>
</tr>
<tr>
    <td class="tRight" >单价</td>
    <td><input type="text" name="unit_price" /> </td>
</tr>
<tr>
    <td class="tRight" >开始</td>
    <td><input type="text" id="start" name="start" /> </td>
</tr>
<tr>
	<td class="tRight" >起始时间：</td>
	<td class="tLeft" >
        <input type="text" id="start_time" name="start_time" value="{$av.start_time|toDate}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
    </td>
</tr>
<tr>
    <td class="tRight" >结束</td>
    <td><input type="text" id="start" name="end" /> </td>
</tr>
<tr>
	<td class="tRight" >结束时间：</td>
	<td class="tLeft" >
           <input type="text" id="end_time" name="end_time" value="{$av.end_time|toDate}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
        </td>
</tr>
<tr>
    <td class="tRight" >使用量</td>
    <td><input type="text" id="start" name="total" /> </td>
</tr>
<tr>
    <td class="tRight" >金额：</td>
        <td class="tLeft" ><input type="text" id="money" name="money" /></td>
</tr>
<tr>
    <td class="tRight">状态：</td>
    <td class="tLeft"><SELECT class="medium bLeft"  name="status">
                <volist name="status" id="st">
                    <option value="{$key}" <eq name="vo.status" value="$key">selected</eq> >{$st}</option>
                </volist>
    </SELECT></td>
</tr>
<tr>
	<td class="tRight" >备注：</td>
	<td class="tLeft" ><textarea name="remark" rows="5" cols="15" class="large"></textarea></td>
</tr>

<tr>
	<td></td>
	<td class="center"><div style="width:85%;margin:5px">
	<div class="impBtn fLeft"><input type="submit" value="保存"  class="save imgButton"></div>
	<div class="impBtn fLeft"><input type="reset" class="reset imgButton" onclick="javascript:history.back()" value="返回" ></div>
	</div></td>
</tr>
</table>
</form>
</div>
</div>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />